Phantom Links

Cannot get rid of phantom links
 
Module A and module B
Module A shows no out links.  Module A properties linksets does not contain a link module with a linkset A to B.
Module B shows in links from A.  The links cannot be followed since the Absolute numbers referenced do not exist in A.  The numbers referenced are not from deleted and purged objects.
If the Analysis Wizard is run on B in links, the phantom links disappear.  But when the module is reopened, they are back.

Any idea on how to delete permanently?
vppatel - Thu Sep 02 10:25:05 EDT 2010

Re: Phantom Links
mgomes - Thu Sep 02 10:49:47 EDT 2010

Try to run the script in attach.

You need to correct the #include in the main script to run correctly.

No guaranties.
Attachments

attachment_14527838_Fixlinks.zip

Re: Phantom Links
vppatel - Thu Sep 02 11:16:00 EDT 2010

mgomes - Thu Sep 02 10:49:47 EDT 2010
Try to run the script in attach.

You need to correct the #include in the main script to run correctly.

No guaranties.

Thanks for the script, but it goes through 2 modules and then I get

-R-E- DXL: <Line:97> null Module do loop parameter was passed
-I- DXL: execution halted

Re: Phantom Links
mgomes - Thu Sep 02 12:02:41 EDT 2010

vppatel - Thu Sep 02 11:16:00 EDT 2010
Thanks for the script, but it goes through 2 modules and then I get

-R-E- DXL: <Line:97> null Module do loop parameter was passed
-I- DXL: execution halted

Acording what i konw to fix this problem it is needed to loop on every object of the module with phantom links and for each object loop on any link opening the modules with target ou source, depending out or in link and save all the modules in the end. Do not forget to refresh links.

This will refresh the links on objects and update them correcting your problem.

Re: Phantom Links
PDU - Fri Sep 03 04:10:40 EDT 2010

mgomes - Thu Sep 02 12:02:41 EDT 2010
Acording what i konw to fix this problem it is needed to loop on every object of the module with phantom links and for each object loop on any link opening the modules with target ou source, depending out or in link and save all the modules in the end. Do not forget to refresh links.

This will refresh the links on objects and update them correcting your problem.

Hello,

we have encoutered today (!) quite the same problem.

In first time,
Module A is source module.
Module B is target module.
A linkset exist between A and B.

In second time we need cut module A, si now
Module A1 et A2 are source module. Some objects have been hard deleted in A1 and A2
Module B is target module.
A linkset exist between A1 and B.
A linkset exist between A2 and B.

In module B we have found objects with 2 input links :
A link from an object module A1, this object exist.
A link from an object module A2, when we follow the link we have a message : this object have been purged.

== script fixlinks.dxl says nothing about links from purged objects.
?? who is possible have input links from purged objects.

We have used Analysis Wizard, and phantom links disappears.
We save module.
Reopen it.
Phantom links do not come back. :-)

Pierre

Re: Phantom Links
mgomes - Fri Sep 03 04:46:34 EDT 2010

PDU - Fri Sep 03 04:10:40 EDT 2010
Hello,

we have encoutered today (!) quite the same problem.

In first time,
Module A is source module.
Module B is target module.
A linkset exist between A and B.

In second time we need cut module A, si now
Module A1 et A2 are source module. Some objects have been hard deleted in A1 and A2
Module B is target module.
A linkset exist between A1 and B.
A linkset exist between A2 and B.

In module B we have found objects with 2 input links :
A link from an object module A1, this object exist.
A link from an object module A2, when we follow the link we have a message : this object have been purged.

== script fixlinks.dxl says nothing about links from purged objects.
?? who is possible have input links from purged objects.

We have used Analysis Wizard, and phantom links disappears.
We save module.
Reopen it.
Phantom links do not come back. :-)

Pierre

Perhaps also works for vppatel.

Thanks for sharing it.

Re: Phantom Links
llandale - Fri Sep 03 10:20:03 EDT 2010

There is a small variety of phantom links. The solutions seem to include..

1 Opening both modules edit, accessing all objects and all links, and then saving and closing the module; even though you made no changes.

2 Another solution I see out there is to create a temporary link in every link-set that has some phantom link, save and close both modules, then open again and delete the temporary link, then save and close again.

Accessing links looks like this:

Module mod = edit("My Module")
Object obj, oTarget
Link   lnk
Date   dat
for obj in entire mod do
{  for lnk in obj ->"*" do
   {  dat = obj."Last Modified Date"
      oTarget = target(lnk)
      if (null oTarget)
         edit(fullName(target(lnk))
      oTarget = target(lnk)
   }
}

Re: Phantom Links
vppatel - Tue Sep 07 09:51:28 EDT 2010

llandale - Fri Sep 03 10:20:03 EDT 2010

There is a small variety of phantom links. The solutions seem to include..

1 Opening both modules edit, accessing all objects and all links, and then saving and closing the module; even though you made no changes.

2 Another solution I see out there is to create a temporary link in every link-set that has some phantom link, save and close both modules, then open again and delete the temporary link, then save and close again.

Accessing links looks like this:

Module mod = edit("My Module")
Object obj, oTarget
Link   lnk
Date   dat
for obj in entire mod do
{  for lnk in obj ->"*" do
   {  dat = obj."Last Modified Date"
      oTarget = target(lnk)
      if (null oTarget)
         edit(fullName(target(lnk))
      oTarget = target(lnk)
   }
}

Thanks, will try this out.

As far as the analysis wizard, the links come back.